package com.neusoft.elm.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.neusoft.elm.dao.OrderDetailetDao;
import com.neusoft.elm.dao.impl.OrderDetailetDaoImpl;
import com.neusoft.elm.po.OrderDetailet;
import com.neusoft.elm.service.OrderDetailetService;
import com.neusoft.elm.util.DBUtil;

public class OrderDetailetServiceImpl implements OrderDetailetService {
    @Override
    public List<OrderDetailet> listOrderDetailetByOrderId(Integer orderId) {
        List<OrderDetailet> list = new ArrayList<>();
        OrderDetailetDao dao = new OrderDetailetDaoImpl();
        try {
            DBUtil.getConnection();
            list = dao.listOrderDetailetByOrderId(orderId);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            DBUtil.close();
        }
        return list;
    }
}